<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>index 영역</title>
<style>
#main{
	width:1200px;
	margin:auto;
/* 	background-color:#22aaaa; */
}
#top{
	width:100%;
/* 	height:250px; */
/* 	background-color:#dddddd; */
}
#bottom{
	width:100%;
	height:250px;
/* 	background-color:#dd77dd; */
}
#left{
	width:250px;
	height:600px; /* 임의로 준값 600px */
 	background-color:#ff0000; /*레드  */ 
	display:inline-block;	
	vertical-align: top;
}
#content{
	width:750px;
	height:600px; /* 임의로 준값 600px */
/* 	background-color:#00ff00; /*그린  */ */
	margin:auto;
	vertical-align: top;
	display:inline-block;	
}
#right{
	width:192px;
	height:600px; /* 임의로 준값 600px */
	background-color:#0000ff; /*블루  */	
	display:inline-block;	
	vertical-align: top;
}

</style>
<script>



</script>

</head>
<body>
<%
request.setCharacterEncoding("utf-8"); //이건 파라미터 값 넘길때.. 한글깨지지 않게, 

String inc_left = null;
String inc_right = null;
String inc_content = null;
String temp = null;

	// 왼쪽메뉴
temp = request.getParameter("inc_left");
if(temp == null || temp == ""){		 // 1)서브content가 링크된 경우
	inc_left = (String)session.getAttribute("inc_left");
}else{		 // 2) content가 링크된 경우
	session.setAttribute("inc_left", temp);
	inc_left = temp;
}
// 3)index2.jsp 페이지만 링크된 경우
if(inc_left == null) inc_left = "none.jsp";


	// 오른쪽메뉴
temp = request.getParameter("inc_right");
if(temp == null || inc_right == "") {
	inc_right = (String)session.getAttribute("inc_right");
}else{
	session.setAttribute("inc_right", temp);
	inc_right = temp;
}
if(inc_right == null) inc_right = "none.jsp";

	//컨텐츠내용
temp = request.getParameter("inc_content");
if(temp == null || inc_content == ""){
	inc_content = (String)session.getAttribute("inc_content");
}else{
	session.setAttribute("inc_content", temp);
	inc_content = temp;
}
if(inc_content == null) inc_content = "none.jsp";
%>

<div id='main'>
	<div id='top'>
		<%@include file='top.jsp' %>
	</div>
	<div id='top_menu'>
		<%@include file='top_menu.jsp' %>
	</div>	
	<div id='center'>
		<div id='left'>
			<jsp:include page="<%=inc_left%>"/>
		</div>
		<div id='content'>
			<jsp:include page="<%=inc_content%>"/>
		</div>
		<div id='right'>
			<jsp:include page="<%=inc_right%>"/>
		</div>
	</div>
	
	<div id='bottom'>
		<%@include file='bottom.jsp'%>
	</div>

</div>

</body>
</html>